<template>
  <div style="background-color:white">
    <div style="">
      <Row class="title-top">
        <Col span="4" style="text-align: left;width:22%">城市低保救助申请登记</Col>
      </Row>
    </div>
    <div style="height:30px;">
      <Steps :current="4" size="small">
        <div @click="nextStep('0')" class="step-item">
          <Step title="家庭信息" content=""></Step>
        </div>
        <div @click="nextStep('1')" class="step-item">
          <Step title="家庭成员" content=""></Step>
        </div>
        <div @click="nextStep('2')" class="step-item">
          <Step title="基础收入" content=""></Step>
        </div>
        <div @click="nextStep('3')" class="step-item">
          <Step title="基础支出" content=""></Step>
        </div>
        <div @click="nextStep('4')" class="step-item">
          <Step title="赡抚扶养" content=""></Step>
        </div>
        <div @click="nextStep('5')" class="step-item">
          <Step title="基础财产" content=""></Step>
        </div>
        <div @click="nextStep('6')" class="step-item">
          <Step title="财产房产" content=""></Step>
        </div>
        <div @click="nextStep('7')" class="step-item">
          <Step title="工作单位" content=""></Step>
        </div>
        <div @click="nextStep('8')" class="step-item">
          <Step title="教育情况" content=""></Step>
        </div>
        <div @click="nextStep('9')" class="step-item">
          <Step title="家庭附件" content=""></Step>
        </div>
        <div @click="nextStep('10')" class="step-item">
          <Step title="提交信息" content=""></Step>
        </div>
      </Steps>
    </div>
    <div class="content">
      <div class="navi-title">
        赡抚扶养信息
      </div>
      <div style="height:30px;margin-top:3px">
        <Button type="info" class="step-item" style="margin-left:5px" size="small" @click="entry()">录入</Button>
        <Modal v-model="modal" title="录入赡抚(扶)养信息" width="900" style="position:relative;">
          <Form ref="paramData" :model="paramData">
            <Row class="item1">
              <Col span="5" style="text-align: center" class="red-name">被赡抚扶养人:</Col>
              <Col span="6">
                <Select v-model="paramData.ssbc0001">
                  <Option :value="obj.ss11002Id" v-for="obj in this.data4.personTypeDict" v-bind:key="obj.ss11002Id">{{obj.azcp0003}}</Option>
                </Select>
              </Col>
              <Col span="5" style="text-align: center" class="red-name">赡抚扶养义务人姓名:</Col>
              <Col span="6">
                <Input v-model="paramData.ssbc0002" placeholder=""></Input>
              </Col>
            </Row>
            <Row class="item1">
              <Col span="5" style="text-align: center" class="">赡抚扶养义务人证件号码:</Col>
              <Col span="6">
                <Input v-model="paramData.ssbc0004" placeholder=""></Input>
              </Col>
              <Col span="5" style="text-align: center" class="">赡抚扶养义务人联系电话:</Col>
              <Col span="6">
                <Input v-model="paramData.ssbc0005" placeholder=""></Input>
              </Col>
            </Row>
            <Row class="item1">
              <Col span="5" style="text-align: center" class="red-name">与被赡抚扶养人关系:</Col>
              <Col span="6">
                <Select v-model="paramData.ssbc0006">
                  <Option :value="obj.key" v-for="obj in data2.RaiseTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
                </Select>
              </Col>
              <Col span="5" style="text-align: center" class="red-name">月赡抚扶养费:</Col>
              <Col span="6">
                <Input v-model="paramData.ssbc0008" placeholder=""></Input>
              </Col>
            </Row>
            <Row class="item1">
              <Col span="5" style="text-align: center" class="red-name">户籍地址:</Col>
              <Col span="6">
                <Input v-model="paramData.ssbc0021" placeholder=""></Input>
              </Col>
              <Col span="5" style="text-align: center" class="red-name">户籍类型:</Col>
              <Col span="6">
                <Select v-model="paramData.ssbc0024">
                  <Option :value="obj.key" v-for="obj in data2.RegisterTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
                </Select>
              </Col>
            </Row>
            <Row class="item1">
              <Col span="5" style="text-align: center" class="red-name">民族:</Col>
              <Col span="6">
                <Select v-model="paramData.ssbc0022">
                  <Option :value="obj.key" v-for="obj in data2.nationDict" v-bind:key="obj.key">{{obj.value}}</Option>
                </Select>
              </Col>
              <Col span="5" style="text-align: center" class="red-name">婚姻状况:</Col>
              <Col span="6">
                <Select v-model="paramData.ssbc0023">
                  <Option :value="obj.key" v-for="obj in data2.MaritalStatusDict" v-bind:key="obj.key">{{obj.value}}</Option>
                </Select>
              </Col>
            </Row>
            <Row class="item1">
              <Col span="5" style="text-align: center" class="red-name">健康状况:</Col>
              <Col span="6">
                <Select v-model="paramData.ssbc0025">
                  <Option :value="obj.key" v-for="obj in data2.HealthDict" v-bind:key="obj.key">{{obj.value}}</Option>
                </Select>
              </Col>
              <Col span="5" style="text-align: center" class="red-name">劳动能力丧失情况:</Col>
              <Col span="6">
                <Select v-model="paramData.ssbc0026">
                  <Option :value="obj.key" v-for="obj in data2.WorkAbilityDict" v-bind:key="obj.key">{{obj.value}}</Option>
                </Select>
              </Col>
            </Row>
            <Row class="" style="height:250px;line-height:250px">
              <Col span="3" style="text-align: center" class="">
                <Col span="24" style="text-align: center" class="">身份证信息上传:</Col>
              </Col>
              <Col span="21" style="text-align: center" class="">
                <Col span="8" style="text-align: center" class="">
                  <div class="imgBackColor">
                    <img :src="nophoto" alt="..." class="head-img1">
                  </div>
                </Col>
                <Col span="4" style="text-align: center" class="">
                  <div class="positiveTDiv" @click="uploadPositiveImg('Positive')">
                    正面上传
                  </div>
                  <div class="positiveBDiv">
                    <span>正面拍摄</span>
                  </div>
                </Col>
                <Col span="8" style="text-align: center" class="">
                  <div class="imgBackColor">
                    <img :src="nophoto1" alt="..." class="head-img1">
                  </div>
                </Col>
                <Col span="4" style="text-align: center" class="">
                  <div class="positiveTDiv" @click="uploadPositiveImg('Back')">
                    反面上传
                  </div>
                  <div class="positiveBDiv">
                    <span>反面拍摄</span>
                  </div>
                </Col>
              </Col>
            </Row>
            <!-- <Row class="item1">
              <Col span="5" style="text-align: center" class="red-name">赡抚扶养义务人家庭月收入:</Col>
              <Col span="6">
                <Input v-model="paramData.ssbc0011" placeholder=""></Input>
              </Col>
              <Col span="5" style="text-align: center" class="red-name">赡抚扶义务养家庭月人均收入:</Col>
              <Col span="6">
                <Input v-model="paramData.ssbc0012" placeholder=""></Input>
              </Col>
            </Row> -->
            <!-- <Row class="item1">
              <Col span="5" style="text-align: center" class="red-name">是否有赡抚扶养能力:</Col>
              <Col span="6">
                <Select v-model="paramData.ssbc0018">
                  <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
                </Select>
              </Col>
              <Col span="5" style="text-align: center" class="">赡抚扶养义务人工作单位:</Col>
              <Col span="6">
                <Input v-model="paramData.ssbc0019" placeholder=""></Input>
              </Col>
            </Row> -->
            <!-- <Row class="item1">
              <Col span="5" style="text-align: center" class="">赡抚扶养义务人工作单位电话:</Col>
              <Col span="6">
                <Input v-model="paramData.ssbc0020" placeholder=""></Input>
              </Col>
            </Row> -->
          </Form>
          <div slot="footer">
            <Button type="text" size="large" @click="modal = false">取消</Button>
            <Button type="primary" size="large" :disabled="order_state == '1' || order_state == '2' || order_state == '3'" @click="ok111(paramData)">确定</Button>
          </div>
        </Modal>
        <Modal v-model="up_pic_mol" title="图片上传" @on-ok="changeToView" :closable="false">
          <Upload multiple action="http://120.27.63.37:38081/api/ac/file/fileCommonService/upLoadFiles" :before-upload="beforeUpload">
            <Button icon="ios-cloud-upload-outline">上传图片</Button>
            <span style="margin-left: 250px">请上传小于8M的图片</span>
          </Upload>
          <img :src="temp_photo" style="width: 100%"/>
        </Modal>
        <!-- <Button type="info" class="step-itemoption" style="margin-left:5px">查看</Button> -->
      </div>
      <div>
        <Table :columns="columns1" :data="data3">
          <template slot-scope="{ row, index, column }" slot="action">
              <Button type="info" size="small"  @click="edit(index)" style="margin-right:5px">编辑</Button>
              <Button type="error" size="small" :disabled="order_state == '1' || order_state == '2' || order_state == '3'"  @click="deletePeople(index)">删除</Button>
          </template>
        </Table>
        <div style="margin: 10px;overflow: hidden">
        <div style="float: right;">
            <Page :total="data3.length" :current="1" @on-change="changePage"></Page>
        </div>
    </div>
      </div>
    </div>
    <div style="height:40px;line-height:40px;float:left;margin-top:10px;margin-left:40%">
      <Button type="info" :disabled="order_state == '1' || order_state == '2' || order_state == '3'" @click="next()" style="margin-right:5px">下一步></Button>
      <Button type="info" @click="nextPage()" v-if="order_state == '1' || order_state == '2' || order_state == '3'">下一页></Button>
    </div>
  </div>
</template>
<script>
import { getCityDBAppraising } from '@/api/subsistenceAlowances'
import { iteminf, updateOrder } from '@/api/eventlist'
import nophoto from '@/assets/images/nophoto.jpeg'
import nophoto1 from '@/assets/images/nophoto1.jpeg'
import './index.less'
import { getSign, createUpLoadFiles } from '@/api/common'
import * as imageConversion from 'image-conversion'
export default {
  data () {
    return {
      // 图片要件预览临时变量
      temp_photo: '',
      // 图片要件预览弹出框控制器
      picPreviewMol: {
        preShow: false,
        pic_urls: [],
        picIndex: 0
      },
      upPicData: {},
      up_pic_mol: false,
      family_url: '',
      support_id: '',
      family_idInfo: {},
      next_params: {},
      itemid: this.$route.params.itemid || '',
      support_url: '',
      info_url: '',
      add_url: '',
      update_url: '',
      delete_url: '',
      see: this.$route.params.see || false,
      code: this.$route.params.code,
      url: 'dbsq/addSupportInfo',
      str: this.$route.params.serialNumber,
      idcardNumber: this.$route.params.idcardNumber,
      ss11001Id: this.$route.params.ss11001Id,
      ss11002Id: this.$route.params.ss11002Id,
      errorTitle: '保存错误',
      columns1: [
        {
          title: '被赡抚扶养人',
          align: 'center',
          key: 'ssbc0001'
        },
        {
          title: '义务人姓名',
          align: 'center',
          key: 'ssbc0002'
        },
        {
          title: '义务人证件号码',
          align: 'center',
          key: 'ssbc0004'
        },
        {
          title: '义务人联系电话',
          align: 'center',
          key: 'ssbc0005'
        },
        {
          title: '与被赡抚扶养人关系',
          align: 'center',
          key: 'ssbc0006'
        },
        {
          title: '月赡抚扶养费',
          align: 'center',
          key: 'ssbc0008'
        },
        {
          title: '操作',
          slot: 'action'
        }
      ],
      paramData: {
        ss11005Id: '',
        ssbc0001: '',
        ssbc0002: '',
        ssbc0004: '',
        ssbc0005: '',
        ssbc0006: '',
        ssbc0008: 0,
        ssbc0018: '',
        ssbc0019: '',
        ssbc0020: ''
      },
      data2: [],
      data3: [],
      dataF1: [],
      modal: false,
      order_state: this.$route.params.order_state,
      form_params: {
        ss11001Data: {},
        ss11002Data: [],
        ss11003Data: [],
        ss11004Data: [],
        ss11005Data: [],
        ss11006Data: [],
        ss11007Data: [],
        ss11008Data: [],
        ss11009Data: [],
        ss11010Data: [],
        ss11012Data: [],
        ss12001Data: {}
      },
      support_arr: [], // 用于存放入参数组
      data4: [],
      nophoto,
      nophoto1
    }
  },
  methods: {
    changeToView () {
      if (this.imgType === 'Positive') {
        this.nophoto = this.temp_photo
      } else if (this.imgType === 'Back') {
        this.nophoto1 = this.temp_photo
      }
    },
    uploadPositiveImg (type) { // 正面上传
      console.log('werwer')
      this.temp_photo = ''
      this.imgType = type
      this.up_pic_mol = true
      if (type === 'Positive') {
        this.upPicData.fileName = '身份证正面' + datetime2str(new Date()) + '.png'
      } else if (type === 'Back') {
        this.upPicData.fileName = '身份证背面' + datetime2str(new Date()) + '.png'
      }
      this.upPicData.filePath = 'itemorder' + '/' + this.$route.params.code
    },
    // 把图片文件作为参数传递到方法中进行压缩
    beforeAvatarUpload (file) {
      const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'
      if (!isJpgOrPng) {
        this.$Notice.error({ title: '上传失败', desc: '上传头像图片只能是 JPG 或 PNG 格式!' })
        return false
      }
      return new Promise(() => {
        imageConversion.compressAccurately(file, 200).then(res => {
          let that = this
          const reader = new FileReader()
          reader.readAsDataURL(new File([res], '', { type: res.type, lastModified: Date.now() }))
          reader.onload = () => {
            let index = reader.result.indexOf('base64,') + 7
            that.upPicData.file = reader.result.substring(index)
            that.upPic(that.upPicData)
          }
        })
      })
    },
    // 上传图片前转base64
    beforeUpload (file) {
      this.upPicData.fileName = this.upPicData.fileName + '.' + file.type.substring(6)
      if (file.size / 1024 / 1024 > 1) { // 超过1M 压缩 图片为200K
        return this.beforeAvatarUpload(file)
      }
      let that = this
      const reader = new FileReader()
      reader.readAsDataURL(file)
      reader.onload = () => {
        let index = reader.result.indexOf('base64,') + 7
        that.upPicData.file = reader.result.substring(index)
        that.upPic(that.upPicData)
      }
      return false
    },
    // 上传图片
    upPic (obj) {
      var time = new Date().getTime()
      this.timeStep = time.toString()
      let param = {
        filePath: obj.filePath,
        fileName: obj.fileName,
        timestamp: this.timeStep
      }
      if (param.fileName.length > 20) {
        param.fileName = param.fileName.substring(0, 20) + '.png'
      }
      getSign(param).then(res => {
        if (res.data.errcode === 0) {
          createUpLoadFiles(res.data.data.docking_url, { sign: res.data.data.sign, timestamp: this.timeStep, filePath: param.filePath, fileName: param.fileName, file: obj.file }).then(res => {
            if (res.data.errcode === 0) {
              let imgurl = res.data.data
              if (this.imgType === 'Positive') {
                this.paramData.ssbc0027url = imgurl
              } else if (this.imgType === 'Back') {
                this.paramData.ssbc0028url = imgurl
              }
              this.temp_photo = imgurl
            } else {
              this.$Notice.error({ title: '上传失败', desc: res.data.data.msg })
            }
          })
        } else {
          this.$Notice.error({ title: '上传失败', desc: res.data.data.msg })
        }
      })
    },
    nextStep (step) {
      if (step === '0') {
        this.$router.push({
          name: 'db_subsistenceapplication',
          params: this.next_params
        })
      } else if (step === '1') {
        this.$router.push({
          name: 'db_subsistenceapplication1',
          params: this.next_params
        })
      } else if (step === '2') {
        this.$router.push({
          name: 'db_subsistenceapplication2',
          params: this.next_params
        })
      } else if (step === '3') {
        this.$router.push({
          name: 'db_expenditurelist',
          params: this.next_params
        })
      } else if (step === '5') {
        this.$router.push({
          name: 'db_basicproperty',
          params: this.next_params
        })
      } else if (step === '6') {
        this.$router.push({
          name: 'db_houseproperty',
          params: this.next_params
        })
      } else if (step === '7') {
        this.$router.push({
          name: 'db_workunit',
          params: this.next_params
        })
      } else if (step === '8') {
        this.$router.push({
          name: 'db_educationinfo',
          params: this.next_params
        })
      } else if (step === '9') {
        this.$router.push({
          name: 'db_nearfamily',
          params: this.next_params
        })
      }
    },
    nextPage () {
      this.$router.push({
        name: 'db_basicproperty',
        params: this.next_params
      })
    },
    getInfo (index, relation, yesOrNot) {
      var param = {
        'idcardNumber': this.idcardNumber,
        'dictsCode': 'ss11005',
        'serialNumber': this.str
      }
      getCityDBAppraising(param).then(res => {
        this.data2 = res.data.data.data
        if (relation) {
          for (var i in this.data2.RaiseTypeDict) {
            if (this.data2.RaiseTypeDict[i].key === relation) {
              this.data3[index].ssbc0006 = this.data2.RaiseTypeDict[i].value
            }
          }
        }
        if (yesOrNot) {
          for (var j in this.data2.YesOrNoDict) {
            if (this.data2.YesOrNoDict[j].key === yesOrNot) {
              this.data3[index].ssbc0018 = this.data2.YesOrNoDict[j].value
            }
          }
        }
      })
    },
    ok111 (item1) {
      let param = {}
      if (this.paramData.ssbc0001 === '' || this.paramData.ssbc0001 === undefined) {
        const content = '<p>请选择被赡抚扶养人</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.ssbc0002 === '' || this.paramData.ssbc0002 === undefined) {
        const content = '<p>请填写赡抚扶养义务人姓名</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.ssbc0006 === '' || this.paramData.ssbc0006 === undefined) {
        const content = '<p>请选择与被赡抚扶养人关系</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.ssbc0008 === '' || this.paramData.ssbc0008 === undefined) {
        const content = '<p>请输入月赡抚扶养费</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.ssbc0021 === '' || this.paramData.ssbc0021 === undefined) {
        const content = '<p>请输入户籍地址</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.ssbc0024 === '' || this.paramData.ssbc0024 === undefined) {
        const content = '<p>请选择户籍类型</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.ssbc0022 === '' || this.paramData.ssbc0022 === undefined) {
        const content = '<p>请选择民族</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.ssbc0023 === '' || this.paramData.ssbc0023 === undefined) {
        const content = '<p>请选择婚姻状况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.ssbc0025 === '' || this.paramData.ssbc0025 === undefined) {
        const content = '<p>请选择健康状况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.ssbc0026 === '' || this.paramData.ssbc0026 === undefined) {
        const content = '<p>请选择劳动能力丧失情况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.ssbc0027url === '' || this.paramData.ssbc0027url === undefined) {
        const content = '<p>请上传身份证正面照片</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.ssbc0028url === '' || this.paramData.ssbc0028url === undefined) {
        const content = '<p>请上传身份证反面照片</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.id !== '') { // 编辑
        this.support_arr[this.id] = this.paramData
        this.support_arr[this.id].ss11005Id = this.$route.params.uuid
      } else {
        this.support_arr.push(this.paramData)
      }
      this.data3 = JSON.parse(JSON.stringify(this.support_arr))
      this.form_params.ss11005Data = this.support_arr
      param = {
        item_id: this.$route.params.itemid,
        cardno: this.$route.params.cardno,
        form_params: this.form_params,
        code: this.$route.params.code
      }
      updateOrder(param).then(res => {
        if (res.data.errcode === 0) {
          this.$Message.success(res.data.errmsg)
          for (var i = 0; i < this.data3.length; i++) {
            for (var j = 0; j < this.data4.personTypeDict.length; j++) {
              if (this.data3[i].ssbc0001 === this.data4.personTypeDict[j].ss11002Id) {
                this.data3[i].ssbc0001 = this.data4.personTypeDict[j].azcp0003
              }
            }
            // this.data3[i].ssbb0002 = '个人'
            this.getInfo(i, this.data3[i].ssbc0006, this.data3[i].ssbc0018)
          }
          this.modal = false
        } else {
          const content = '<p>' + res.data.errmsg + '</p>'
          this.$Modal.error({
            title: this.errorTitle,
            content: content
          })
        }
      })
    },
    edit (item1) {
      this.modal = true
      this.paramData = this.support_arr[item1]
      this.id = item1
      this.nophoto = this.paramData.ssbc0027url
      this.nophoto1 = this.paramData.ssbc0028url
    },
    deletePeople (item1) {
      if (confirm('确定删除吗')) {
        this.data3.splice(item1, 1)
        this.support_arr.splice(item1, 1)
        this.form_params.ss11005Data = JSON.parse(JSON.stringify(this.support_arr))
        var param = {
          item_id: this.$route.params.itemid,
          cardno: this.$route.params.cardno,
          form_params: this.form_params,
          code: this.$route.params.code
        }
        updateOrder(param).then(res => {
          if (res.data.errcode === 0) {
            this.$Message.success(res.data.errmsg)
            for (var i = 0; i < this.data3.length; i++) {
              for (var j = 0; j < this.data4.personTypeDict.length; j++) {
                if (this.data3[i].ssbc0001 === this.data4.personTypeDict[j].ss11002Id) {
                  this.data3[i].ssbc0001 = this.data4.personTypeDict[j].azcp0003
                }
              }
              // this.data3[i].ssbb0002 = '个人'
              this.getInfo(i, this.data3[i].ssbc0006, this.data3[i].ssbc0018)
            }
            this.modal = false
          } else {
            const content = '<p>' + res.data.errmsg + '</p>'
            this.$Modal.error({
              title: this.errorTitle,
              content: content
            })
          }
        })
      }
    },
    next () {
      console.log('下一步')
      this.$router.push({
        name: 'db_basicproperty',
        params: this.next_params
      })
    },
    changePage () {
      // The simulated data is changed directly here, and the actual usage scenario should fetch the data from the server
      this.data3 = this.getSupportList()
    },
    entry () { // 录入
      this.paramData = {}
      this.paramData.ss11005Id = this.$route.params.uuid
      this.id = ''
      this.modal = true
    }
  },
  mounted () {
    let param2 = {
      'cardno': this.$route.params.cardno,
      'id': this.$route.params.itemid,
      'code': this.$route.params.code,
      'params': '1'
    }
    iteminf(param2).then(res => {
      if (res.data.data) {
        if (JSON.parse(res.data.data.form_params).ss11001Data) {
          this.form_params.ss11001Data = JSON.parse(res.data.data.form_params).ss11001Data
        }
        if ((JSON.parse(res.data.data.form_params)).ss11002Data) {
          this.form_params.ss11002Data = JSON.parse(res.data.data.form_params).ss11002Data
          this.data4.personTypeDict = this.form_params.ss11002Data
        }
        if (JSON.parse(res.data.data.form_params).ss11003Data) {
          this.form_params.ss11003Data = JSON.parse(res.data.data.form_params).ss11003Data
        }
        if (JSON.parse(res.data.data.form_params).ss11004Data) {
          this.form_params.ss11004Data = JSON.parse(res.data.data.form_params).ss11004Data
        }
        if (JSON.parse(res.data.data.form_params).ss11005Data) {
          this.form_params.ss11005Data = JSON.parse(res.data.data.form_params).ss11005Data
          this.support_arr = JSON.parse(JSON.stringify(this.form_params.ss11005Data))
          this.data3 = JSON.parse(JSON.stringify(this.form_params.ss11005Data))
          for (var i = 0; i < this.data3.length; i++) {
            for (var j = 0; j < this.data4.personTypeDict.length; j++) {
              if (this.data3[i].ssbc0001 === this.data4.personTypeDict[j].ss11002Id) {
                this.data3[i].ssbc0001 = this.data4.personTypeDict[j].azcp0003
              }
            }
            // this.data3[i].ssbb0002 = '个人'
            this.getInfo(i, this.data3[i].ssbc0006, this.data3[i].ssbc0018)
          }
        }
        if (JSON.parse(res.data.data.form_params).ss11006Data) {
          this.form_params.ss11006Data = JSON.parse(res.data.data.form_params).ss11006Data
        }
        if (JSON.parse(res.data.data.form_params).ss11007Data) {
          this.form_params.ss11007Data = JSON.parse(res.data.data.form_params).ss11007Data
        }
        if (JSON.parse(res.data.data.form_params).ss11008Data) {
          this.form_params.ss11008Data = JSON.parse(res.data.data.form_params).ss11008Data
        }
        if (JSON.parse(res.data.data.form_params).ss11009Data) {
          this.form_params.ss11009Data = JSON.parse(res.data.data.form_params).ss11009Data
        }
        if (JSON.parse(res.data.data.form_params).ss11010Data) {
          this.form_params.ss11010Data = JSON.parse(res.data.data.form_params).ss11010Data
        }
        if (JSON.parse(res.data.data.form_params).ss11012Data) {
          this.form_params.ss11012Data = JSON.parse(res.data.data.form_params).ss11012Data
        }
        if (JSON.parse(res.data.data.form_params).ss12001Data) {
          this.form_params.ss12001Data = JSON.parse(res.data.data.form_params).ss12001Data
        }
      }
    })
    this.next_params = {
      serialNumber: this.$route.params.serialNumber,
      idcardNumber: this.$route.params.idcardNumber,
      code: this.$route.params.code,
      cardno: this.$route.params.cardno,
      itemid: this.itemid,
      order_state: this.order_state,
      uuid: this.$route.params.uuid
    }
    this.getInfo()
  }
}
</script>
